package com.mashibing.remote;

import com.mashibing.dto.ResponseResult;
import com.mashibing.request.VerificationCodeRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient("service-passenger-user")
public interface PassengerUserRemote {
    @RequestMapping(method = RequestMethod.POST,value = "/user")
    public ResponseResult loginOrRegister(@RequestBody VerificationCodeRequest verificationCodeRequest);

    @RequestMapping(method = RequestMethod.GET,value = "/user/{phone}")
    public ResponseResult getUser(@PathVariable("phone") String phone);
}
